package com.itasura.chain.doctor;

import com.itasura.chain.AbstractWorkChain;
import com.itasura.chain.RegisterType;
import com.itasura.chain.Request;
import lombok.extern.slf4j.Slf4j;

/**
 * 外科门诊
 * @author sailor wang
 * @date 2018/8/27 下午3:05
 * @description
 */
@Slf4j
public class SurgeryChain extends AbstractWorkChain {
    @Override
    public void handleRequest(Request request) {
        if (request == null || !request.getIsRegister()){
            log.info("外科医生：请先挂号。");
            return;
        }
        log.info("外科医生：各种xxxxx操作后，发现确实病了");
        request.setIsSick(true);
        log.info("外科医生：去化验下。。。。");

        AbstractWorkChain assaylChain = DoctorPool.getDoctor(RegisterType.ASSAY);
        setNextChain(assaylChain).handleRequest(request);
    }
}